#version 400 core
uniform mat4 mv_matrix;
uniform mat4 proj_matrix;
layout (location = 0) in vec3 position;
layout (location = 2) in vec3 normal;

out VS_OUT
{
    vec4 color;
    vec3 normal;
} vs_out;

uniform float value;

void main(void)
{
    vec4 pos_vs = mv_matrix * vec4(position,1.0);
    gl_Position = proj_matrix * pos_vs;

    vs_out.normal = normal;

    if(position.y > value)
    {
        vs_out.color = vec4(0.3,0.3,0.2,1.0);
    }
    else
    {
        vs_out.color = vec4(0.4,0.6,6.0,1.0);
    }
}
